Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid map key conflict for document results #456

Merged
merged 2 commits into from
Aug 12, 2024

Conversation

sahilvaidya
Copy link
Contributor

We currently can't have VerticalResults for document verticals since two results from the same entity will cause a map key conflict. To resolve this, we are making the key the result ID and the result index which should always be unique.

J=WAT-4282
TEST=manual,auto

Created a test document search config on the test-site which previously failed to return VerticalResults properly due to the key error now returns the results and updates on a new search

We currently can't have VerticalResults for document verticals since
two results from the same entity will cause a map key conflict.
To resolve this, we are making the key the result ID and the result
index which should always be unique.

J=WAT-4282
TEST=manual,auto

Created a test document search config on the test-site which previously
failed to return VerticalResults properly due to the key error
now returns the results and updates on a new search
@sahilvaidya sahilvaidya requested a review from a team as a code owner August 12, 2024 17:50
Copy link
Contributor

Current unit coverage is 92.12481426448737%
Current visual coverage is 79.01234567901234%
Current combined coverage is 92.62376237623762%

@coveralls
Copy link

coveralls commented Aug 12, 2024

Coverage Status

coverage: 85.38% (-0.007%) from 85.387%
when pulling 07ef449 on dev/support-document-vertical
into d21223b on hotfix/v1.6.2.

Copy link
Contributor

@Fondryext Fondryext left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! glad it was simple

@sahilvaidya sahilvaidya merged commit 01ecfa9 into hotfix/v1.6.2 Aug 12, 2024
20 checks passed
@sahilvaidya sahilvaidya deleted the dev/support-document-vertical branch August 12, 2024 18:00
@sahilvaidya sahilvaidya mentioned this pull request Aug 12, 2024
sahilvaidya added a commit that referenced this pull request Aug 12, 2024
Version 1.6.2
**Fixes**
- Enables Document Verticals to use VerticalResult by adjusting VerticalResult map key to combine the result id and index avoiding conflicts #456
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants